home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / XP Suite / DATA1.CAB / XP_Calendar_Sample_Files / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2003-04-24  |  14.7 KB  |  468 lines

  1. VERSION 5.00
  2. Object = "{A2519F5D-D953-41FB-A034-2D873A107F26}#1.0#0"; "ciaXPCalendar.ocx"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H00FFFFFF&
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   14220
  7.    ClientLeft      =   60
  8.    ClientTop       =   450
  9.    ClientWidth     =   14610
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   14220
  12.    ScaleWidth      =   14610
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin ciaXPStyleCalendar.XPCalendar XPCalendar1 
  15.       Height          =   8940
  16.       Left            =   210
  17.       TabIndex        =   26
  18.       Top             =   150
  19.       Width           =   8835
  20.       _ExtentX        =   15584
  21.       _ExtentY        =   15769
  22.       BeginProperty LeftFootNoteFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  23.          Name            =   "MS Sans Serif"
  24.          Size            =   8.25
  25.          Charset         =   0
  26.          Weight          =   400
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       BeginProperty RightFootNoteFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  32.          Name            =   "MS Sans Serif"
  33.          Size            =   8.25
  34.          Charset         =   0
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       BeginProperty CenterFootNoteFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  41.          Name            =   "MS Sans Serif"
  42.          Size            =   8.25
  43.          Charset         =   0
  44.          Weight          =   400
  45.          Underline       =   0   'False
  46.          Italic          =   0   'False
  47.          Strikethrough   =   0   'False
  48.       EndProperty
  49.       BeginProperty MonthTitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  50.          Name            =   "MS Sans Serif"
  51.          Size            =   8.25
  52.          Charset         =   0
  53.          Weight          =   400
  54.          Underline       =   0   'False
  55.          Italic          =   0   'False
  56.          Strikethrough   =   0   'False
  57.       EndProperty
  58.       TitleForeColor  =   13977088
  59.       BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  60.          Name            =   "MS Sans Serif"
  61.          Size            =   8.25
  62.          Charset         =   0
  63.          Weight          =   400
  64.          Underline       =   0   'False
  65.          Italic          =   0   'False
  66.          Strikethrough   =   0   'False
  67.       EndProperty
  68.       FirstDayOfWeek  =   5
  69.       BeginProperty DaysFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  70.          Name            =   "MS Sans Serif"
  71.          Size            =   8.25
  72.          Charset         =   0
  73.          Weight          =   400
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       BeginProperty MonthFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  79.          Name            =   "MS Sans Serif"
  80.          Size            =   8.25
  81.          Charset         =   0
  82.          Weight          =   400
  83.          Underline       =   0   'False
  84.          Italic          =   0   'False
  85.          Strikethrough   =   0   'False
  86.       EndProperty
  87.       BeginProperty ComboSpinFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  88.          Name            =   "MS Sans Serif"
  89.          Size            =   8.25
  90.          Charset         =   0
  91.          Weight          =   400
  92.          Underline       =   0   'False
  93.          Italic          =   0   'False
  94.          Strikethrough   =   0   'False
  95.       EndProperty
  96.       GlobalDefaultThemeColors=   0   'False
  97.       GlobalDefaultThemeColors=   0   'False
  98.       Style           =   2
  99.       MonthBorderColor=   255
  100.       DaysForeColor   =   8421631
  101.       DaysBackColor   =   14653050
  102.       DaysBorderColor =   14121559
  103.       MouseIcon       =   "Form1.frx":0000
  104.       PrevNextColor   =   12632256
  105.       ComboSpinBorderColor=   12164479
  106.    End
  107.    Begin VB.TextBox txtYear 
  108.       Height          =   270
  109.       Left            =   11805
  110.       Locked          =   -1  'True
  111.       TabIndex        =   24
  112.       Text            =   "Text1"
  113.       Top             =   2430
  114.       Width           =   885
  115.    End
  116.    Begin VB.HScrollBar sYear 
  117.       Height          =   270
  118.       Left            =   12975
  119.       Max             =   9000
  120.       Min             =   1
  121.       TabIndex        =   23
  122.       Top             =   2430
  123.       Value           =   1
  124.       Width           =   525
  125.    End
  126.    Begin VB.TextBox txtQuarter 
  127.       Height          =   270
  128.       Left            =   11805
  129.       Locked          =   -1  'True
  130.       TabIndex        =   21
  131.       Text            =   "Text1"
  132.       Top             =   2100
  133.       Width           =   885
  134.    End
  135.    Begin VB.HScrollBar sQuarter 
  136.       Height          =   270
  137.       Left            =   12975
  138.       Max             =   4
  139.       Min             =   1
  140.       TabIndex        =   20
  141.       Top             =   2100
  142.       Value           =   1
  143.       Width           =   525
  144.    End
  145.    Begin VB.ComboBox cboMonth 
  146.       Height          =   315
  147.       Left            =   11805
  148.       TabIndex        =   18
  149.       Text            =   "Combo1"
  150.       Top             =   1725
  151.       Width           =   1575
  152.    End
  153.    Begin VB.ComboBox cboFirstDayOfWeek 
  154.       Height          =   315
  155.       Left            =   11805
  156.       TabIndex        =   16
  157.       Text            =   "Combo1"
  158.       Top             =   1350
  159.       Width           =   1575
  160.    End
  161.    Begin VB.ComboBox cboMonthTitleAlignment 
  162.       Height          =   315
  163.       Left            =   11775
  164.       TabIndex        =   14
  165.       Text            =   "Combo1"
  166.       Top             =   4755
  167.       Width           =   1575
  168.    End
  169.    Begin VB.ComboBox cboTitleAlignment 
  170.       Height          =   315
  171.       Left            =   11775
  172.       TabIndex        =   12
  173.       Text            =   "Combo1"
  174.       Top             =   4395
  175.       Width           =   1575
  176.    End
  177.    Begin VB.TextBox txtRighttFootNote 
  178.       Height          =   285
  179.       Left            =   11775
  180.       TabIndex        =   10
  181.       Top             =   4065
  182.       Width           =   2565
  183.    End
  184.    Begin VB.TextBox txtCenterFootNote 
  185.       Height          =   285
  186.       Left            =   11775
  187.       TabIndex        =   8
  188.       Top             =   3735
  189.       Width           =   2565
  190.    End
  191.    Begin VB.TextBox txtLeftFootNote 
  192.       Height          =   285
  193.       Left            =   11775
  194.       TabIndex        =   6
  195.       Top             =   3405
  196.       Width           =   2565
  197.    End
  198.    Begin VB.TextBox txtTitle 
  199.       Height          =   285
  200.       Left            =   11775
  201.       TabIndex        =   4
  202.       Top             =   3090
  203.       Width           =   2565
  204.    End
  205.    Begin VB.ComboBox cboColorScheme 
  206.       Height          =   315
  207.       Left            =   11790
  208.       TabIndex        =   2
  209.       Text            =   "Combo1"
  210.       Top             =   585
  211.       Width           =   1575
  212.    End
  213.    Begin VB.ComboBox cboStyle 
  214.       Height          =   315
  215.       Left            =   11790
  216.       TabIndex        =   0
  217.       Text            =   "Combo1"
  218.       Top             =   225
  219.       Width           =   1575
  220.    End
  221.    Begin VB.Label Label13 
  222.       Alignment       =   1  'Right Justify
  223.       AutoSize        =   -1  'True
  224.       BackColor       =   &H00FFFFFF&
  225.       Caption         =   "Calendar Year:"
  226.       Height          =   195
  227.       Left            =   10605
  228.       TabIndex        =   25
  229.       Top             =   2475
  230.       Width           =   1050
  231.    End
  232.    Begin VB.Label Label12 
  233.       Alignment       =   1  'Right Justify
  234.       AutoSize        =   -1  'True
  235.       BackColor       =   &H00FFFFFF&
  236.       Caption         =   "Calendar Quarter:"
  237.       Height          =   195
  238.       Left            =   10410
  239.       TabIndex        =   22
  240.       Top             =   2145
  241.       Width           =   1245
  242.    End
  243.    Begin VB.Label Label10 
  244.       Alignment       =   1  'Right Justify
  245.       AutoSize        =   -1  'True
  246.       BackColor       =   &H00FFFFFF&
  247.       Caption         =   "Calendar Month:"
  248.       Height          =   195
  249.       Left            =   10500
  250.       TabIndex        =   19
  251.       Top             =   1770
  252.       Width           =   1170
  253.    End
  254.    Begin VB.Label Label3 
  255.       Alignment       =   1  'Right Justify
  256.       AutoSize        =   -1  'True
  257.       BackColor       =   &H00FFFFFF&
  258.       Caption         =   "First Day of Week:"
  259.       Height          =   195
  260.       Left            =   10365
  261.       TabIndex        =   17
  262.       Top             =   1395
  263.       Width           =   1320
  264.    End
  265.    Begin VB.Label Label9 
  266.       Alignment       =   1  'Right Justify
  267.       AutoSize        =   -1  'True
  268.       BackColor       =   &H00FFFFFF&
  269.       Caption         =   "Month Title Alignment:"
  270.       Height          =   195
  271.       Left            =   10065
  272.       TabIndex        =   15
  273.       Top             =   4800
  274.       Width           =   1575
  275.    End
  276.    Begin VB.Label Label8 
  277.       AutoSize        =   -1  'True
  278.       BackColor       =   &H00FFFFFF&
  279.       Caption         =   "Title Alignment:"
  280.       Height          =   195
  281.       Left            =   10575
  282.       TabIndex        =   13
  283.       Top             =   4440
  284.       Width           =   1080
  285.    End
  286.    Begin VB.Label Label7 
  287.       Alignment       =   1  'Right Justify
  288.       AutoSize        =   -1  'True
  289.       BackColor       =   &H00FFFFFF&
  290.       Caption         =   "Right FootNote:"
  291.       Height          =   195
  292.       Left            =   10515
  293.       TabIndex        =   11
  294.       Top             =   4095
  295.       Width           =   1125
  296.    End
  297.    Begin VB.Label Label6 
  298.       Alignment       =   1  'Right Justify
  299.       AutoSize        =   -1  'True
  300.       BackColor       =   &H00FFFFFF&
  301.       Caption         =   "Center FootNote:"
  302.       Height          =   195
  303.       Left            =   10425
  304.       TabIndex        =   9
  305.       Top             =   3765
  306.       Width           =   1215
  307.    End
  308.    Begin VB.Label Label5 
  309.       Alignment       =   1  'Right Justify
  310.       AutoSize        =   -1  'True
  311.       BackColor       =   &H00FFFFFF&
  312.       Caption         =   "Left FootNote:"
  313.       Height          =   195
  314.       Left            =   10635
  315.       TabIndex        =   7
  316.       Top             =   3435
  317.       Width           =   1020
  318.    End
  319.    Begin VB.Label Label4 
  320.       Alignment       =   1  'Right Justify
  321.       AutoSize        =   -1  'True
  322.       BackColor       =   &H00FFFFFF&
  323.       Caption         =   "Title:"
  324.       Height          =   195
  325.       Left            =   11310
  326.       TabIndex        =   5
  327.       Top             =   3120
  328.       Width           =   345
  329.    End
  330.    Begin VB.Label Label2 
  331.       Alignment       =   1  'Right Justify
  332.       AutoSize        =   -1  'True
  333.       BackColor       =   &H00FFFFFF&
  334.       Caption         =   "Color Scheme:"
  335.       Height          =   195
  336.       Left            =   10650
  337.       TabIndex        =   3
  338.       Top             =   630
  339.       Width           =   1035
  340.    End
  341.    Begin VB.Label Label1 
  342.       AutoSize        =   -1  'True
  343.       BackColor       =   &H00FFFFFF&
  344.       Caption         =   "Style:"
  345.       Height          =   195
  346.       Left            =   11310
  347.       TabIndex        =   1
  348.       Top             =   270
  349.       Width           =   390
  350.    End
  351. Attribute VB_Name = "Form1"
  352. Attribute VB_GlobalNameSpace = False
  353. Attribute VB_Creatable = False
  354. Attribute VB_PredeclaredId = True
  355. Attribute VB_Exposed = False
  356. Option Explicit
  357. Dim bLoaded As Boolean
  358. Private Sub Form_Load()
  359. With cboTitleAlignment
  360.     .AddItem "Align Left"
  361.     .AddItem "Align Right"
  362.     .AddItem "Align Center"
  363. End With
  364. With cboMonthTitleAlignment
  365.     .AddItem "Align Left"
  366.     .AddItem "Align Right"
  367.     .AddItem "Align Center"
  368. End With
  369. With cboStyle
  370.     .AddItem "Monthly"
  371.     .AddItem "Quarterly"
  372.     .AddItem "Annually"
  373.     .AddItem "Annual Compact"
  374. End With
  375. With cboColorScheme
  376.     .AddItem "XPBlue"
  377.     .AddItem "XPSilver"
  378.     .AddItem "XPOlive"
  379. End With
  380. With cboFirstDayOfWeek
  381.     .AddItem "1 - Sunday"
  382.     .AddItem "2 - Monday"
  383.     .AddItem "3 - Tuesday"
  384.     .AddItem "4 - Wednesday"
  385.     .AddItem "5 - Thursday"
  386.     .AddItem "6 - Friday"
  387.     .AddItem "7 - Saturday"
  388. End With
  389. With cboMonth
  390.   .AddItem "January"
  391.   .AddItem "February"
  392.   .AddItem "March"
  393.   .AddItem "April"
  394.   .AddItem "May"
  395.   .AddItem "June"
  396.   .AddItem "July"
  397.   .AddItem "August"
  398.   .AddItem "September"
  399.   .AddItem "October"
  400.   .AddItem "November"
  401.   .AddItem "December"
  402. End With
  403. UpdateSettings
  404. End Sub
  405. Private Sub txtCenterFootNote_Change()
  406. XPCalendar1.CenterFootNote = txtCenterFootNote
  407. End Sub
  408. Private Sub txtLeftFootNote_Change()
  409. XPCalendar1.LeftFootNote = txtLeftFootNote
  410. End Sub
  411. Private Sub txtRighttFootNote_Change()
  412. XPCalendar1.RightFootNote = txtRighttFootNote
  413. End Sub
  414. Private Sub txtTitle_Change()
  415. XPCalendar1.Title = txtTitle
  416. End Sub
  417. Private Sub cboMonthTitleAlignment_Click()
  418. XPCalendar1.MonthTitleAlignment = cboMonthTitleAlignment.ListIndex
  419. End Sub
  420. Private Sub cboTitleAlignment_Click()
  421. XPCalendar1.TitleAlignment = cboTitleAlignment.ListIndex
  422. End Sub
  423. Private Sub cboStyle_Click()
  424. XPCalendar1.Style = cboStyle.ListIndex
  425. End Sub
  426. Private Sub cboColorScheme_Click()
  427. XPCalendar1.Theme = cboColorScheme.ListIndex
  428. End Sub
  429. Private Sub cboFirstDayOfWeek_Click()
  430.     XPCalendar1.FirstDayOfWeek = cboFirstDayOfWeek.ListIndex + 1
  431. End Sub
  432. Private Sub sYear_Change()
  433. If Not bLoaded Then Exit Sub
  434. XPCalendar1.CalendarYear = sYear.Value
  435. UpdateSettings
  436. End Sub
  437. Private Sub sQuarter_Change()
  438. If Not bLoaded Then Exit Sub
  439. XPCalendar1.CalendarQuarter = sQuarter.Value
  440. UpdateSettings
  441. End Sub
  442. Private Sub cboMonth_Click()
  443. If Not bLoaded Then Exit Sub
  444. XPCalendar1.CalendarMonth = cboMonth.ListIndex + 1
  445. UpdateSettings
  446. End Sub
  447. Private Sub UpdateSettings()
  448. bLoaded = False
  449. cboTitleAlignment.ListIndex = XPCalendar1.TitleAlignment
  450. cboMonthTitleAlignment.ListIndex = XPCalendar1.MonthTitleAlignment
  451. cboStyle.ListIndex = XPCalendar1.Style
  452. cboColorScheme.ListIndex = XPCalendar1.Theme
  453. cboFirstDayOfWeek.ListIndex = XPCalendar1.FirstDayOfWeek - 1
  454. cboMonth.ListIndex = XPCalendar1.CalendarMonth - 1
  455. txtQuarter = XPCalendar1.CalendarQuarter
  456. sQuarter.Value = XPCalendar1.CalendarQuarter
  457. txtYear = XPCalendar1.CalendarYear
  458. sYear.Value = XPCalendar1.CalendarYear
  459. bLoaded = True
  460. End Sub
  461. '************************ CALENDAR EVENTS ****************************************
  462. Private Sub XPCalendar1_DateClick(ByVal SelectedDate As Date)
  463. Debug.Print "XPCalendar1_DateClick.....Date = " & SelectedDate
  464. End Sub
  465. Private Sub XPCalendar1_MonthClick(ByVal SelectedDate As Date)
  466. Debug.Print "XPCalendar1_MonthClick.....Date = " & SelectedDate
  467. End Sub
  468.